/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package asja.formulario;

import asja.dao.LoginDao;
import asja.modelo.LoginModelo;
import asja.outras.Conversoes;
import java.awt.*;
import java.awt.event.*;
import java.sql.SQLException;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.*;

/**
 *
 * @author Alice
 */
public class SobreFormulario extends JFrame {
    
    private JLabel lbl_imagem, lbl_objetivo;  
    private JButton bt_fechar, btCancelar;
 
    
     public SobreFormulario() 
    {        
        
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);  
        this.setTitle("Sobre");  
        this.setSize(400, 200);          
        this.setLocationRelativeTo(null);  
    } 
     
     
    
     
     // criando a janela
    public void criaJanela()  
    {     
        
              
        lbl_imagem= new JLabel();
        lbl_imagem.setIcon(new ImageIcon("imagens\\sobre.jpg")); // NOI18N
        
        lbl_objetivo= new JLabel();
        lbl_objetivo.setIcon(new ImageIcon("imagens\\sobre1.jpg")); // NOI18N
        
    
        bt_fechar = new JButton("Fechar");  
        bt_fechar.setPreferredSize(new Dimension(100,30)); 
        

        //painel dos botões
        JPanel painel_comandos = new JPanel();  
        painel_comandos.setLayout(new FlowLayout());
        painel_comandos.add(bt_fechar);
        
       //painel no norte
        JPanel painel_norte = new JPanel();  
        painel_norte.setLayout(new BorderLayout());
        painel_norte.add(lbl_imagem, BorderLayout.NORTH);
        painel_norte.add(lbl_objetivo, BorderLayout.CENTER);
        
       //criando o painel principal e adicionando ao JFrame
        JPanel painel_geral = new JPanel();
        this.getContentPane().add(painel_geral);    
        painel_geral.setLayout(new BorderLayout());            
        painel_geral.add(painel_comandos, BorderLayout.SOUTH);
        painel_geral.add(painel_norte, BorderLayout.NORTH);
        
         
        bt_fechar.addMouseListener(new MouseAdapter() {
        @Override
            public void mouseClicked(MouseEvent evt) {
             MenuPrincipalFormulario mnu_principal = new MenuPrincipalFormulario(); 
             mnu_principal.criajanela_menuprincipal();  
             mnu_principal.aparencia_MenuPrincipal();
             dispose();        
        }});
   
         this.setResizable(false);
        pack();        
        this.setVisible(true);
         
   
    }  
   

   
}
